package imnu.io.file;

import java.io.File;
import java.io.FilenameFilter;

/**
 * @author: lys
 * @类名: Test_05
 * @Title:
 * @date: 2020/7/20
 **/
public class Test_05 {
    public static void main(String[] args) {
        File file = new File("F:\\JAVASE\\day20-递归、IO-字符流111\\avi\\031-IO-字符流");
        String[] strFileName = file.list(new FilenameFilter() {
            @Override
            public boolean accept(File file, String s) {
                if (s.endsWith(".avi")){
                    return true;
                }else{
                    return false;
                }
            }
        });
        for (String ff:strFileName) {
            System.out.println(ff);
        }
    }
}
